just more implementation and cleanup