Changed Function header to be of the correct signature