removed global controller function