removed intermidiate variables