Removed the unnecessary functions from prepare