updated for elgg 1.8