added visit model
fixed few minor issues