tried some optimizing