a function to retrieve map size