added getLastId