Implemting getting min element inside list TODO