creating new and edit methods