Provide ugly but working implementation