remove custom traits and use result_of and decltype instead