Changed to only accept -a as the optional flag and it can appear in any position in the arguments