completed implementation of create action in model