CRUD methods implementation in swift