Wow, it is really that simple. Thank you very much.
Just had a quick look. Maybe this will get you started:
ps. Using Subscripted variables is not a good idea.