change class Post to struct