added header to separate private and public functions