update to function :)