Add gist model
move the method to model