implemented reference types. added static Generate-method to keygenerator