Yucky method, I will rewrite with a class