added fix type casting