Lifo based on array