Moved code to a new view to avoid conflicts