fixing ' bug and implementing gem as executable