this code is so fucking bad