attempt at performance enhancement