add map and same type function