removed all wasteful code