did some optimizing