added some functions, mainly constructors