re-arranging the functions.