make sure return type is int