completed code. Start runs