updated with fixes from testing