removed global methods. a better error definition