implement most of functionality. add travis integration