non OOP style exercise