working with the aim function