added register func