make method templated to reduce project releated dependency