fixes and functionality improvements