Combining all the existing code.