bug-fixes, and fully implemented the main feature