simplify resource constructor