added some commenting for documentation