Ok, did you write this method (specially mapping array) yourself or this is a part of other library?