reverted useless optimization, added some more helpers