creating the page properly using scala