some more refactor to speed up thigs
including dependencies