This code is so bad.