Update: adjusted function output