fix a printing issue
implement the modular lambda function