Changed return type to void from int