Added grep options
Added define function