Code used for A, bonus func