fiddling around with posts
merged code
foreach parser error resolved