this code is (purposefully) terrible don't judge me