move location and fix trailing space bug