changed functionality to work with linux