some optimations