updated detachRole() to take project