implement str to int