sample ruby code for marco as requested