added first button position determination