improved compile .rb file