improved temlate