moved beautiful rest logic to generic bundle