added rudimentary control scheme