added save method, constructor model