added alternative method, cleaned up example page