switched to functional syntax to reduce file size