script for assigning roles