*~
some 'refactoring'
fixed some errors