update category Save and Update functions to work with continuous loop