modified the whole application to work for all linux distros