adds logic for running and testing