added thread management, requesting at model should be improved, fixed bootstrap management for functions