refactor age and size conversion