this is worse but faster, going to refactor and cleanup