what a poor code :(