add Core Class
fixed many bugs
add generator in case of BOOL