added code to post_register and post_character