clean up and match to reqirements