1st pass at improving performance