converted string to int, alt method