Code is ugly as hell right now though