implemented bash version