Studies of bosons in optical lattices in a harmonic potential