Changing over DB. Deprecated code