cleaned up, added some indentation