fixed pr issues and tests