Zaslat SMS: Optimal feedback control for undamped wave equations by solving a HJB equation