Added test code for backward compatibility