removed debug statements and deprecated code