fixed bad coding