trying fix problem with .serialize()