used modern bash syntax