optimize shell