implementing flat methods using typetraits module