kinda working probably somewhat broken lwp implementation