RCode for submission 2