// a solution for a coding challenge