Continuing towards Ruby implementation