function for calculating recessive accent