this code is fucking terrible. man. amateur