full implementation of issue # 204