added logic to create sample microposts
fixed a syntax issue