modified setRequirements to get an arraylist of graphelements instead of ids