Reverted to semi-working version