moved state variables local
added travis support