Implementing method to set instances in anotation