more work on enlarge function