added default values
fixed type selection