add log statment to check the type of varibles