fixed FIXME of code duplication