structure is re-organized; new functions added