fix funtions