fixed some small bugs
added list empty function