some improvements to the functional module