adding some tests, fixed issue with bash script