logic fixes and more features