reworking angle adjustment code