implement testing and clean up package