customized the functions