Feature/improve select stmt