Working code (don't mind the red x)