major code cleaning (bug with decimal points though)