This function is currently under construction and may not work properly.