@purpose
refectory the code