implementation of parsing option complete