Added Amirs code to combined