crud functions implemented