optimized
optimized and added todo