changed into functions type