quick fix, really need better names...
okay, finally working...