added similarity tasks
fixed syntax errors
fixed a small potential bug
some exception need to be hanlded
fixed a small problem in attr_accesible i caused