refactor to crud class
generic crud class