move away from using stderr. use print function