not sure i like this solution, but it works