Cleaned up source (no change in function)