fixing code

close #1