some optimalization