add function to check if we're really on the ramp

plus some reformatting for readability