Added bulk of functionality