I'm really sorry but this was just too embarrassing to keep up here(even though unixjingleman is not my name ha ha ha). I won't post any other questions unless i need really need help. At the time i wrote the code it seemed like it was worth asking about it and indeed i got a kind reply.But in retrospect it was just ridiculously trivial and as such doesn't seem worth being up there. Sorry!
thanks