improved deleteFunction imll, added more unit tests