resolving issues 165 and 166