added select, need to fix counting... slow + bug