Refactoring to get backward compatibility