add gem, reorganize routes and mapping feature