j starting from 0