refactored
updated crud