supports function objects now too