string api implement practice