todo and a small fix for factors