remove debug and add more control
