first working implementation

really minor but you should probably have spaces between the brackets on else statements like this: `} else {`