worked on cli and queue, but print function not working