fix, added return value and code format