added entry point testing code
v4 support