tweaked and simplified compose.  only works with single function argument input atm