added pushr, fixed expand and got rid of expand_nd