fixed a few bugs and added new types