lets be clear, I've code some pretty dirty lines for this to work