code clean up. add imput from debug console