not exactly a nice way to do it but I don't know a better one right now