refactoring done, now need to add more features