wrote serialize instead of encode, silly php