functions correction