Started writing the code properly