updated to work with two