added more comments... more functions