adding template implementation and package documentation