Adding the local map function