using typedef for the map to clean the code a bit
checking if the values are inside a specified interval for SUCCESS/FAIL