Maybe finished. Testing function and syntax on ubuntu first