code pretty fixed