updated crud functions