fixes and functionality