changed parameter name for joining to entities table