synched with demibot repo