New approach - no library code needed