added main check so file can be imported, comments