added spread for functions and a simple sample for classes