made Get next method in atom class virtual