implement working next button (still need cleaning)