Added alternative way of doing downcasting