better require implementation