end if statement in mapped.rb