refactpring and lots of features