replaced with bad coding practices