Updated with bad coding practices