worst code ever
48 lines