Updated function #4