rewrote the code i deleted by accident :,(