added type casting