merged flack into master- added fetch function