updating code, still not working with ->'s