few little changes with optimalization.