replaced hardcoded max. value with value from xml file