Main functionality is done