code is a mess