val function sucks