Work in progress, but works rather good