implemented options parser