Corrected a few mistakes, made use of variables