updated for ruby