added some types
added some types
updated to be compatible to current source code