fighting with loading base libraries
fixing a few bugs