rhythm object - functional code