Changing name and correcting script to include error structure into balance velocity based optimization