implemented delete method as well as better model creation