added global timeout option
removed $options param as it causes more problems than it solves