adds bool factory
adds factory util
bugfixes: access to uninitialized pointer at primitive class