repeatations removed. fms code added