Added multi scale support