putting functions into actual class definitions