Updated Function u() to not be depreciated. Might not work though...