A little ghetto but it works