Thanks for the quick reply, that code seems to be what I need, I just need to free up some time to experiment with it and maybe go through some more tutorials to understand programming a little better, I'll let you know how it goes once I have time. also is "bool" a in the first line correct?