not pretty, but kinda works