added ending scene and tied together functions