Initial version of hacky bash version