fixed loop and bin