removed deprecated code and added annotations