it's ugly as shit, will fix later