resolving Ruby errors