started developing wtatage sample function