add serialize functions instead of hardcoded values