added grep and some error solving, with lucky14 fix