... and again, should this function actually be a function on layer?