One more attempt. Added in some extra work so that it still works almost as i originally intended