first attempt at coding without cheating