laby_print function modified