runs as main script