add lib folder and author code for model.rb