semi working version - weird bugs today...