updated. mostly removed the dependency on bin dir