You shouldnt be using 256 loops please refer to the following link for the appropriate way of doing so: