removed print
added control functionality