last attempt using stdin