Some updates to functions