resolved marcus's code to latest one
resolved marcus's code to latest one