replace print with message