refactored to implement php short tags and alternative syntax